'use strict';

/**
 * @ngdoc function
 * @name appApp.controller:ProfileFaqCtrl
 * @description
 * # ProfileFaqCtrl
 * Controller of the appApp
 */
angular.module('appApp')
  .controller('ProfileFaqCtrl', function ($scope,$routeParams,onlineFac,$rootScope) {
    $scope.currentFaqId = $routeParams.faqId;
    $scope.getFaqList = function(){
    	onlineFac.article.faqlist({
    		faqId: $routeParams.faqId
    	},function(data){
    		$scope.faqlist = data.info;
    		$scope.faq = data.faq;
    	},function(data){
    		alert(data.data.info);
    	});
    }

    $rootScope.getFaqMenu = function(){
      onlineFac.article.categorylist({
        listId: 58
      },function(data){
        $rootScope.faqCategory = data.info;
        $scope.getFaqList();
      },function(data){
        alert(data.data.info);
      })
    }

    $scope.contentShow = function(faq){
    	faq.show = !faq.show;
    }
  });
